function onSay(cid, words, param, channel)
local quantia = 2 -- Quantia de monstros permitida
local pid = cid
local t = string.explode(param, ",")
if(t[2]) then
pid = getPlayerByNameWildcard(t[2])
if(not pid or (isPlayerGhost(pid) and getPlayerGhostAccess(pid) > getPlayerGhostAccess(cid))) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. t[2] .. " not found.")
return true
end
end
if getCreatureSummons(cid) == quantia then
doPlayerSendCancel(cid, "Máximo de summons atingido.")
return true
end
local effect = CONST_ME_MAGIC_RED
local ret = doSummonMonster(pid, t[1])
if(ret ~= RETURNVALUE_NOERROR) then
effect = CONST_ME_POFF
doPlayerSendDefaultCancel(cid, ret)
end
doSendMagicEffect(getCreaturePosition(cid), effect)
return true
end
Tó.







info
Grupo: Campones
Registrado: 20/01/12
Posts: 15
Reputação: 0
Char no Tibia: pally
to tentando fazer comando pra criar bicho pq gm criar muitos com /m
eu queria que tivesse um limite cria 1 ou 2 ai quando player mata ele vai pode criar outro pq tem vez que fica muito lag gm faz muitos mostros de vez
function onSay(cid, words, param) doSummonCreature("demon", getThingPos(cid)) endEditado Setembro 3 por vidalokkka